/*
 * Copyright (c) 2023 huipei.x
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package cn.xphsc.kubernetes.core.query;

import io.kubernetes.client.openapi.models.V1Namespace;
import io.kubernetes.client.openapi.models.V1Secret;

/**
 * {@link }
 * @author <a href="xiongpeih@163.com">huipei.x</a>
 * @description: Create Namespace Body
 * @since 1.0.0
 */
public class CreateNamespaceBody {
    /**
     * namespace object name and auth scope, such as for teams and projects (required)
     */
    private String namespace;
    private V1Secret body;
    private String pretty;
    private String dryRun;
    private String fieldManager;
    private  String fieldValidation;


    public static CreateNamespaceBody.Builder builder() {
        return new CreateNamespaceBody.Builder();
    }

    private CreateNamespaceBody(CreateNamespaceBody.Builder builder) {
        this.namespace = builder.namespace;
        this.body = builder.body;
        this.pretty = builder.pretty;
        this.dryRun = builder.dryRun;
        this.fieldManager = builder.fieldManager;
        this.fieldValidation=builder.fieldValidation;
    }


    public static class Builder {
        private String namespace;
        private V1Secret body;
        private   String pretty;
        private String dryRun;
        private String fieldManager;
        private String fieldValidation;

        public Builder() {
        }
        /**
         * namespace object name and auth scope, such as for teams and projects (required)
         */
        public <T> CreateNamespaceBody.Builder namespace(String namespace) {
            this.namespace = namespace;
            return this;
        }
        public <T> CreateNamespaceBody.Builder body(V1Secret body) {
            this.body = body;
            return this;
        }
        /**
         * pretty If &#39;true&#39;, then the output is pretty printed. (optional)
         */
        public <T> CreateNamespaceBody.Builder pretty(String pretty) {
            this.pretty = pretty;
            return this;
        }
        /**
         *  dryRun When present, indicates that modifications should not be persisted. An invalid or
         * unrecognized dryRun directive will result in an error response and no further processing of
         * the request. Valid values are: - All: all dry run stages will be processed (optional)
         */
        public <T> CreateNamespaceBody.Builder dryRun(String dryRun) {
            this.dryRun = dryRun;
            return this;
        }
        /**
         * fieldManager is a name associated with the actor or entity that is making
         * these changes. The value must be less than or 128 characters long, and only contain
         *  printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional)
         */
        public <T> CreateNamespaceBody.Builder fieldManager(String fieldManager) {
            this.fieldManager = fieldManager;
            return this;
        }
        /**
         * fieldValidation instructs the server on how to handle objects in the
         *  request (POST/PUT/PATCH) containing unknown or duplicate fields, provided that the
         *  &#x60;ServerSideFieldValidation&#x60; feature gate is also enabled. Valid values are: -
         *  Ignore: This will ignore any unknown fields that are silently dropped from the object, and
         *  will ignore all but the last duplicate field that the decoder encounters. This is the
         * default behavior prior to v1.23 and is the default behavior when the
         *  &#x60;ServerSideFieldValidation&#x60; feature gate is disabled. - Warn: This will send a
         *  warning via the standard warning response header for each unknown field that is dropped
         *  from the object, and for each duplicate field that is encountered. The request will still
         *  succeed if there are no other errors, and will only persist the last of any duplicate
         *  fields. This is the default when the &#x60;ServerSideFieldValidation&#x60; feature gate is
         * enabled. - Strict: This will fail the request with a BadRequest error if any unknown fields
         *  would be dropped from the object, or if any duplicate fields are present. The error
         *  returned from the server will contain all unknown and duplicate fields encountered.
         *   (optional)
         */
        public <T> CreateNamespaceBody.Builder fieldValidation(String fieldValidation) {
            this.fieldValidation = fieldValidation;
            return this;
        }


        public CreateNamespaceBody build() {
            return new CreateNamespaceBody(this);
        }
    }

    public String namespace() {
        return namespace;
    }

    public V1Secret body() {
        return body;
    }

    public String pretty() {
        return pretty;
    }




    public String dryRun() {
        return dryRun;
    }

    public String fieldManager() {
        return fieldManager;
    }
    public String fieldValidation() {
        return fieldValidation;
    }
}
